package edu.tamu.cse.lenss.sensor;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

/**
 * This file store the information of all the used sensors
 * @author Jay
 *
 */
public final class SensorInfo {
	public static enum SensorType{
		ACCELEROMETER("Accelerometer"), 
		GPS("Gps"),
		NETWORK_LOC("Network_Location"),
		GSM("Gsm"),
		CDMA("Cdma"),
		WIFI("Wifi");
		
		private final String name;
		
		SensorType(String n){
			this.name = n;
		}

		@Override
		public String toString() {
			return name;
		}
	}
	
	private static final HashMap<SensorType, String> dirNameMap = new HashMap<SensorType, String>();
	private static final HashMap<SensorType, String> fileNameMap = new HashMap<SensorType, String>();

	static{
		dirNameMap.put(SensorType.ACCELEROMETER, "Acc");
		dirNameMap.put(SensorType.GPS, "Gps");
		dirNameMap.put(SensorType.NETWORK_LOC, "Network_loc");
		dirNameMap.put(SensorType.GSM, "Cell_Tower_info");
		dirNameMap.put(SensorType.CDMA, "Cell_Tower_info");
		dirNameMap.put(SensorType.WIFI, "wifi");
		
		fileNameMap.put(SensorType.ACCELEROMETER, "acc_history.csv");
		fileNameMap.put(SensorType.GPS, "gps_history.csv");
		fileNameMap.put(SensorType.NETWORK_LOC, "network_history.csv");
		fileNameMap.put(SensorType.GSM, "gsm_info.csv");
		fileNameMap.put(SensorType.CDMA, "cdma_info.csv");
		fileNameMap.put(SensorType.WIFI, "neighbor_wifi.csv");
	}
	
	public static List<SensorType> getAvailableSensors(){
		return Arrays.asList(SensorType.values());
	}
	
	public static String getDirName(SensorType t){
		return dirNameMap.get(t);
	}
	
	public static String getFileName(SensorType t){
		return fileNameMap.get(t);
	}

}
